package SQL.Mybatis.Annotation.DAO;

import SQL.Mybatis.Entity.User;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by kz on 2017/5/18.
 *
 * 使用注解,可以直接使SQL变成方法
 */
public interface UserDao {
    @Select("SELECT * FROM users WHERE id <>#{id}")
    public User getById2(int id);

    @Select("SELECT * FROM users")
    public List<User> getAll();
}
